package com.keguoyu.easymvp.ioc;

final class ClassHelper {

  private ClassHelper() {}

  public static boolean isNumber(Class<?> clss) {
    return isInteger(clss) || isFloatingPoint(clss);
  }

  public static boolean isInteger(Class<?> clss) {
    return clss == byte.class || clss == char.class || clss == short.class || clss == int.class
        || clss == long.class || clss == Byte.class || clss == Character.class
        || clss == Short.class || clss == Integer.class || clss == Long.class;
  }

  public static boolean isFloatingPoint(Class<?> clss) {
    return clss == float.class || clss == double.class || clss == Float.class
        || clss == Double.class;
  }

  public static boolean isBoolean(Class<?> clss) {
    return clss == boolean.class || clss == Boolean.class;
  }

  public static boolean isVoid(Class<?> clss) {
    return clss == void.class || clss == Void.class;
  }

  public static boolean isString(Class<?> clss) {
    return clss == String.class;
  }
}
